package com.lbs.jiepiaisi.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.util.Log;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lbs.jiepiaisi.R;
import com.lbs.jiepiaisi.bean.EquipBean;

import java.util.List;

/**
 * Created by yu on 2020-01-07 16:40.
 * Description:
 */
public class EquipSearchAdapter extends BaseQuickAdapter<EquipBean.Result.Items, BaseViewHolder> {


    public EquipSearchAdapter(@LayoutRes int layoutResId, @Nullable List<EquipBean.Result.Items> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, EquipBean.Result.Items item) {
        Log.e("777888999","777888999");
        Log.e("777888999","eqNo = "+item.getEqNo());

        helper.setText(R.id.tv_ownername, item.getOwnerName() == null ? "" : item.getOwnerName())
                .setText(R.id.tv_platenum, item.getPlateNum() == null ? "" : item.getPlateNum())
                .setText(R.id.tv_eqnum, item.getEqNo() == null ? "" : item.getEqNo())
                .setText(R.id.tv_vinnum, item.getVin() == null ? "" : item.getVin())
                .addOnClickListener(R.id.ll_out);

    }
}
